package com.github.wj.security.server.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by wangj on 2017/7/13.
 */
@Entity
@Table(name = "T_BSDT_LOGGER")
public class TBsdtLogger {
    private Long id;
    private String loginid;
    private String beanName;
    private String methodName;
    private String remoteAddr;
    private String requestTime;
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date requestDate;
    private String requestUri;
    private Long beginTime;
    private String result;
    private String method;
    private String requestDateFmt;
    private String requestDateEndFmt;

    @Id
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "LOGINID")
    public String getLoginid() {
        return loginid;
    }

    public void setLoginid(String loginid) {
        this.loginid = loginid;
    }

    @Basic
    @Column(name = "BEAN_NAME")
    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Basic
    @Column(name = "METHOD_NAME")
    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    @Basic
    @Column(name = "REMOTE_ADDR")
    public String getRemoteAddr() {
        return remoteAddr;
    }

    public void setRemoteAddr(String remoteAddr) {
        this.remoteAddr = remoteAddr;
    }

    @Basic
    @Column(name = "REQUEST_TIME")
    public String getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(String requestTime) {
        this.requestTime = requestTime;
    }

    @Basic
    @Column(name = "REQUEST_DATE")
    public Date getRequestDate() {
        return requestDate;
    }

    public void setRequestDate(Date requestDate) {
        this.requestDate = requestDate;
    }

    @Basic
    @Column(name = "REQUEST_URI")
    public String getRequestUri() {
        return requestUri;
    }

    public void setRequestUri(String requestUri) {
        this.requestUri = requestUri;
    }

    @Basic
    @Column(name = "RESULT")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Basic
    @Column(name = "METHOD")
    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    @Transient
    public Long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Long beginTime) {
        this.beginTime = beginTime;
    }

    @Transient
    public String getRequestDateFmt() {
        return requestDateFmt;
    }

    public void setRequestDateFmt(String requestDateFmt) {
        this.requestDateFmt = requestDateFmt;
    }

    @Transient
    public String getRequestDateEndFmt() {
        return requestDateEndFmt;
    }

    public void setRequestDateEndFmt(String requestDateEndFmt) {
        this.requestDateEndFmt = requestDateEndFmt;
    }
}
